import request from "@/utils/request";
export interface IpageParams{
  count:number,
  limitNum:number,
}
export const getProListApi=(params:IpageParams)=>request.get('/pro/list',{
  params
})
import type {IKeywordParmas} from '@/@types/pro'
export const getHistoryProListApi=()=>request.get('/pro/hotword')
export const getSearshListApi=(str:string)=>new Promise<IKeywordParmas[]>((resolve)=>{
  setTimeout(()=>{
    resolve([...Array(10)].map((item,index)=>({id:index,keyworld:`${str}-${index+1}`})))
  },500)
})
export const getProDetailApi=(proid:string)=>request.get(`/pro/detail/${proid}`)
import type {ISearshFiltersparams} from '@/views/AppList/server'
export interface IFiltersparams extends ISearshFiltersparams{
  keyword:string
}
// 获取searsh列表
export const getFiltersListApi=(searsh:IFiltersparams,page:IpageParams)=>{
  // console.log(searsh,page)
  return request.get('/pro/search',{
    params:{...searsh,...page}
  })
}
export const getCateGoryListApi=()=>request.get('/pro/categorylist')
// 获取分类列表
export interface ICateParams{
  count:number,
  limitNum:number,
  keyword:string
}
export const getBrandListApi=(params:ICateParams)=>request.get('/pro/search',{
  params 
})
